As used herein, the term “magnetic field sensing element” is used to describe a variety of electronic elements that can sense a magnetic field. One such magnetic field sensing element is a magnetoresistance (MR) element. The magnetoresistance element has a resistance that changes in relation to a magnetic field experienced by the magnetoresistance element.
As is known, there are different types of magnetoresistance elements, for example, a giant magnetoresistance (GMR) element and a tunneling magnetoresistance (TMR) element, also called a magnetic tunnel junction (MTJ) element.
Of these magnetoresistance elements, the GMR and the TMR elements operate with spin electronics (i.e., electron spins) where the resistance is related to the magnetic orientation of different magnetic layers separated by nonmagnetic layers. In spin valve configurations, the resistance is related to an angular direction of a magnetization in a so-called “free-layer” relative to another layer so-called “reference layer.” The free layer and the reference layer are described more fully below.
Most, but not all, magnetoresistance elements have a maximum response axis parallel to a substrate upon which they are formed.
The magnetoresistances element may be used as a single element or, alternatively, may be used as two or more magnetoresistance elements arranged in various configurations, e.g., a half bridge or full (Wheatstone) bridge.
As used herein, the term “magnetic field sensor” is used to describe a circuit that uses one or more magnetic field sensing elements, generally in combination with other circuits. In a typical magnetic field sensor, the magnetic field sensing element and the other circuits can be integrated upon a common substrate, for example, a semiconductor substrate. In some embodiments, the magnetic field sensor can also include a lead frame and packaging.
Magnetic field sensors are used in a variety of applications, including, but not limited to, an angle sensor that senses an angle of a direction of a magnetic field, a current sensor that senses a magnetic field generated by a current carried by a current-carrying conductor, a magnetic switch that senses the proximity of a ferromagnetic object, a rotation detector that senses passing ferromagnetic articles, for example, magnetic domains of a ring magnet or a ferromagnetic target (e.g., gear teeth) where the magnetic field sensor is used in combination with a back-biased or other magnet, and a magnetic field sensor that senses a magnetic field density of a magnetic field.
Various parameters characterize the performance of magnetic field sensors and magnetic field sensing elements. With regard to magnetic field sensing elements, the parameters include sensitivity, which is the change in the output signal of a magnetic field sensing element in response to a magnetic field, and linearity, which is the degree to which the output signal of a magnetic field sensor varies linearly (i.e., in direct proportion) to the magnetic field. The parameters also include offset, which describes and output from the magnetic field sensing element that is not indicative of zero magnetic field when the magnetic field sensor experiences a zero magnetic field.
GMR and TMR elements are known to have a relatively high sensitivity, compared, for example, to Hall effect elements. Thus, a current sensor that uses GMR or TMR elements can sense smaller currents than can a current sensor that uses Hall effect elements.
TMR elements are known to have a higher sensitivity than GMR elements, but at the expense of higher noise at low frequencies.
Magnetic field sensing elements used in a magnetic field sensor, e.g., a current sensor that senses a local magnetic field generated by a current conductor, can be influenced not only by the local magnetic field that is desirable to measure, but also by an undesirable stray magnetic field that can be external to the magnetic field sensor, and which can come from any direction. Techniques, such as differential sensing, can be used to mitigate errors caused by the stray magnetic field. However, some influence of the stray magnetic field may still remain.
Thus, it would be desirable to provide a magnetic field sensor that can measure a stray magnetic field and, in some embodiments, compensate for the influence of the stray magnetic field upon the magnetic field sensor.